package com.ruoyi.accountant.job;

import com.ruoyi.accountant.service.InaccountService;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

/***
 * 换汇到账任务
 */
public class InaccountJob extends QuartzJobBean {
    private Logger logger = LoggerFactory.getLogger(InaccountJob.class);

    @Autowired
    private InaccountService inaccountService;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("执行换汇到账");
        int i = inaccountService.doInaccount();
        logger.info("换汇到账个数"+i);
    }
}
